// JavaScript Document

window.onload=function()
{
var obj=document.getElementById("list_tr");
 var objDl=obj.getElementsByTagName('dl');
 for(var i=0;i<objDl.length;i++){  //循环表格行设置鼠标事件
   objDl[i].onmouseover=function(){this.style.background="#F4F7FA";}
   objDl[i].onmouseout=function(){this.style.background="#FFFFFF";}
 };
  var esfsort= document.getElementById('esfsort');

  var oSelect =esfsort.getElementsByTagName("span")[0];
    var oSub = esfsort.getElementsByTagName("ul")[0];
    var aLi = oSub.getElementsByTagName("li");
    var i = 0;
    oSelect.onmouseover = function (event)
    {
    var style = oSub.style;
    style.display = style.display == "block" ? "none" : "block";
    //阻止事件冒泡
    (event || window.event).cancelBubble = true
    };
    for (i = 0; i < aLi.length; i++)
    {
    //鼠标划过
    aLi[i].onmouseover = function ()
    {
    this.className = "hover"
    };
    //鼠标离开
    aLi[i].onmouseout = function ()
    {
    this.className = "";
    };
    //鼠标点击
    aLi[i].onclick = function ()
    {
    oSelect.innerHTML = this.innerHTML
    }
    }
    document.onclick = function ()
    {
    oSub.style.display = "none";
    };
}